<!--
 * @Description:
 * @Autor: zhang
 * @Date: 2020-11-12 10:29:21
 * @LastEditors: xinsang
 * @LastEditTime: 2020-12-28 14:16:33
-->
<template>
  <div class="vcm-navigation">
    <div class="navigation-header">{{ title }}</div>
    <div
      v-for="(item, index) in navigs"
      :key="index"
      class="navigation-set"
      :class="isAct === index ? 'navigation-text' : ''"
      @click="subsearch(item, index)"
    >
      {{ item.extendTag }}
    </div>
  </div>
</template>
<script>
export default {
  props: {
    navigs: {
      type: Array,
      default: () => []
    },
    title: {
      type: String,
      default: () => '主播推荐'
    }
  },
  data() {
    return {
      isAct: 0
    }
  },
  methods: {
    subsearch(item, index) {
      this.isAct = index
      this.$emit('subsearch', item)
    }
  }
}
</script>
<style lang="scss" scoped>
.vcm-navigation {
  width: 100%;
  height: 20px;
  line-height: 20px;
  margin-bottom: 10px;
  .navigation-header {
    font-weight: 500;
    color: #333;
    padding-right: 30px;
    float: left;
    font-size: 18px;
  }
  .navigation-set {
    color: #84878c;
    padding: 1px;
    margin-right: 15px;
    float: left;
    cursor: pointer;
    &:hover {
      color: #ff8147;
    }
  }
  .navigation-text {
    color: #ff8147;
    border-bottom: 1px solid #ff8147;
    margin-right: 15px;
  }

}
</style>
